export const constantRoutes = [
    {
        path: '/login',
        name: 'Login',
        component: () => import('../pages/login/index.vue'),
        meta: {
            title: '登录',
            icon: 'Comment',
            hidden: true
        }
    },
    {
        path: '/',
        name: 'Home',
        component: () => import('../pages/home/index.vue'),
        redirect: '/sys_home',
        meta: {
            title: '',
            icon: '',
            hidden: false
        },
        children: [
            {
                path: '/sys_home',
                name: 'SysHome',
                component: () => import('../pages/sys_home/index.vue'),
                meta: {
                    title: '首页',
                    icon: 'HomeFilled',
                    hidden: false
                }
            }
        ]
    },
    {
        path: '/center',
        component: () => import('../pages/home/index.vue'),
        name: 'Center',
        meta: {
            hidden: false,
            icon: 'Avatar',
            title: '个人中心'
        },
        redirect: '/my_info',
        children: [
            {
                path: '/my_info',
                name: 'MyInfo',
                component: () => import('../pages/my_info/index.vue'),
                meta: {
                    hidden: false,
                    title: '个人信息',
                    icon: ''
                }
            },
            {
                path: '/update_password',
                name: 'UpdatePassword',
                component: () => import('../pages/update_password/index.vue'),
                meta: {
                    hidden: false,
                    title: '修改密码',
                    icon: ''
                }
            }
        ]
    },
    {
        path: '/404',
        name: '404',
        component: () => import('../pages/404/index.vue'),
        meta: {
            title: '404',
            icon: 'Histogram',
            hidden: true
        }
    }

]

// 异步路由
export const asyncRoute = [
    {
        path: '/info',
        name: 'Info',
        component: () => import('../pages/home/index.vue'),
        redirect: '/notice',
        meta: {
            title: '信息管理',
            icon: 'InfoFilled',
            hidden: false
        },
        children: [
            {
                path: '/notice',
                name: 'Notice',
                component: () => import('../pages/notice/index.vue'),
                meta: {
                    title: '公告信息',
                    icon: '',
                    hidden: false
                }
            },
            {
                path: '/information',
                name: 'Information',
                component: () => import('../pages/information/index.vue'),
                meta: {
                    title: '扶贫资讯',
                    icon: '',
                    hidden: false
                }
            },
            {
                path: '/policy',
                name: 'Policy',
                component: () => import('../pages/policy/index.vue'),
                meta: {
                    title: '扶贫政策',
                    icon: '',
                    hidden: false
                }
            },
            {
                path: '/agritainment',
                name: 'Agritainment',
                component: () => import('../pages/agritainment/index.vue'),
                meta: {
                    title: '农家乐信息',
                    icon: '',
                    hidden: false
                }
            },
            {
                path: '/commodity',
                name: 'Commodity',
                component: () => import('../pages/commodity/index.vue'),
                meta: {
                    title: '商品管理',
                    icon: '',
                    hidden: false
                }
            },
            {
                path: '/orders',
                name: 'Orders',
                component: () => import('../pages/orders/index.vue'),
                meta: {
                    title: '订单管理',
                    icon: '',
                    hidden: false
                }
            },
            {
                path: '/comments',
                name: 'Comments',
                component: () => import('../pages/comments/index.vue'),
                meta: {
                    title: '政策评论',
                    icon: '',
                    hidden: false
                }
            }
        ]
    },
    {
        path: '/apply',
        name: 'Apply',
        redirect: '/poor_apply',
        component: () => import('../pages/home/index.vue'),
        meta: {
            title: '申请管理',
            hidden: false,
            icon: 'List'
        },
        children: [
            {
                path: '/poor_apply',
                name: 'PoorApply',
                component: import('../pages/poor_apply/index.vue'),
                meta: {
                    hidden: false,
                    title: '贫困户申请',
                    icon: ''
                }
            },
            {
                path: '/project_apply',
                name: 'ProjectApply',
                component: () => import('../pages/project_apply/index.vue'),
                meta: {
                    hidden: false,
                    title: '扶贫项目申请',
                    icon: ''
                }
            }
        ]
    },
    {
        path: '/user',
        name: 'User',
        redirect: '/admin_management',
        component: () => import('../pages/home/index.vue'),
        meta: {
            title: '用户管理',
            icon: 'UserFilled',
            hidden: false
        },
        children: [
            {
                path: '/admin_management',
                name: 'AdminManagement',
                component: () => import('../pages/admin_management/index.vue'),
                meta: {
                    hidden: false,
                    title: '管理员',
                    icon: ''
                }
            },
            {
                path: '/user_management',
                name: 'UserAanagement',
                component: () => import('../pages/user_management/index.vue'),
                meta: {
                    hidden: false,
                    title: '普通用户',
                    icon: ''
                }
            }
        ]
    },
    {
        path: '/permiss',
        name: 'Permiss',
        redirect: '/permission',
        component: () => import('../pages/home/index.vue'),
        meta: {
            title: '权限管理',
            hidden: false,
            icon: 'Grid'
        },
        children: [
            {
                path: '/permission',
                name: 'Permission',
                component: () => import('../pages/permission/index.vue'),
                meta: {
                    hidden: false,
                    title: '角色管理',
                    icon: ''
                }
            },
            {
                path: '/admin_permission',
                name: 'AdminPermission',
                component: () => import('../pages/admin_permission/index.vue'),
                meta: {
                    hidden: false,
                    title: '管理员权限',
                    icon: ''
                }
            },
        ]
    }
]

// 任意路由
export const anyRoute = {
    // 任意路由
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
        title: '任意路由',
        icon: 'Grid',
        hidden: true
    }
}